When logged in as a standard AdminUser and you try to change your own password, Devise automatically logs you out.

Adding the following controller override to <code>admin_user.rb</code> solves this issue:

```ruby
controller do
  def update
    # get the currently logged in AdminUser's id
    current_id = current_admin_user.id
    # load the AdminUser being updated
    @admin_user = AdminUser.find(params[:id])
    # update the AdminUser with new attributes
    # if successful, this will sign out the AdminUser being updated
    if @admin_user.update_attributes(permitted_params[:admin_user])
      # if the updated AdminUser was the currently logged in AdminUser, sign them back in
      if @admin_user.id == current_id
        sign_in(AdminUser.find(current_id), :bypass => true)
      end
      flash[:notice] = I18n.t('devise.passwords.updated_not_active')
      redirect_to '/admin/admin_users'
    # display errors
    else
      render :action => :edit
    end
  end
end

```

Note the instance variable <code>@admin_user</code> is being used. This allows for the proper display of form validation errors. If your user uses a different model name, be sure to change the instance variable to the model name.